using System;
using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class TableCellType
    {

        private System.Nullable<uint> _ColSpan;
        private GTame.ReportParser.ReportItemsTypeSingle _ReportItems;

        public System.Nullable<uint> ColSpan
        {
            get
            {
                return _ColSpan;
            }
            set
            {
                _ColSpan = value;
            }
        }

        public GTame.ReportParser.ReportItemsTypeSingle ReportItems
        {
            get
            {
                if (_ReportItems == null)
                    _ReportItems = new GTame.ReportParser.ReportItemsTypeSingle();
                return _ReportItems;
            }
            set
            {
                _ReportItems = value;
            }
        }

        public TableCellType()
        {
            _ColSpan = new System.Nullable<uint>[]();
        }

        public Rdl.TableCellType Write()
        {
            Rdl.TableCellType tableCellType = new Rdl.TableCellType();
            System.Collections.ArrayList arrayList = new System.Collections.ArrayList();
            if (_ColSpan.get_HasValue())
                arrayList.Add(_ColSpan);
            if (_ReportItems != null)
                arrayList.Add(_ReportItems.Write());
            tableCellType.Items = arrayList.ToArray();
            arrayList = null;
            return tableCellType;
        }

    } // class TableCellType

}

